﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;

namespace Multithreading
{
    class Program
    {
        static void Main(string[] args)
        {
            var workThread = new Thread( new ParameterizedThreadStart(Square));
            System.Console.WriteLine("Enter a number: ");
            var parameter = double.Parse(System.Console.ReadLine());

            workThread.Start((Object) parameter);
            
        }

        static void Square(Object n)
        {
            var parameter = (double) n;
            var result = Math.Sqrt(parameter);

            System.Console.WriteLine("Squareroot is: " + result);
        }
    }
}
